<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
<div id="app">
    <h1>{{money | toKOR}}</h1>
</div>
</body>

</html>
<script src='https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js'></script>
<script>

    //vue3.0中没有过滤器

    //过滤器一般用于处理视图模版数据

    let vm = new Vue({
        el: "#app",
        data: {
            money: 234234
        },
        filters: {
            //每个过滤器都是一个函数,函数的名字就是过滤器的名称
            toKOR: (input) => {
                //this指向都是window
                console.log(input)
                console.log(this)
                return input * 191.9386
            }
        }
    })

</script>